﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SPMS.Common.Pinyin;

namespace SPMS.Common.Test
{
    [TestClass]
    public class TestFormsAuthenticationHelper
    {
        [TestMethod]
        public void TestIsPasswordEqual()
        {
            string password = "xA123456";

            string storedPassword = FormsAuthenticationHelper.HashPassword(password);

            Assert.AreEqual(true, FormsAuthenticationHelper.IsPasswordEqual(password, storedPassword));
        }

        [TestMethod]
        public void TestPinYinConverter()
        {
            string result = PinYinConverter.ConvertToPinYin("测试数据");

            Assert.AreEqual("CSSJ", result);
        }
    }
}
